import { defineConfig } from 'umi';
import routes from '../src/routes/index';

export default defineConfig({
  base: '/',
  title: 'PRACTICE',
  favicon: 'https://img.alicdn.com/tfs/TB1YHEpwUT1gK0jSZFhXXaAtVXa-28-27.svg',
  hash: true,
  history: {
    type: 'hash',
  },
  nodeModulesTransform: {
    type: 'none',
  },
  devServer: {
    port: 9527,
  },
  proxy: {
    '/api': {
      target: 'http://114.215.174.202:9001',
      changeOrigin: true,
      pathRewrite: { '^/api': '' },
    },
  },
  antd: {
    // dark: true,
  },
  dva: {
    immer: true,
    // hmr: false, model热更新
  },
  dynamicImport: {},
  routes,
  mock: false,
  theme: {
    '@primary-color': '#58a6ff',
  },
});
